package heima.lm.oschina.vpfragment;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewPager;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import heima.lm.oschina.R;
import heima.lm.oschina.adapter.AboutMeAdapter;
import heima.lm.oschina.base.BaseFragment;
import heima.lm.oschina.bean.Active;
import heima.lm.oschina.utils.UIUtils;

/**
 * Created by xiguoqiang on 2017/4/6.
 */

public class AboutMeFragment extends BaseFragment {
    @BindView(R.id.srl_aboutme_sweet)
    SwipeRefreshLayout mSwipeRefreshLayout;
    @BindView(R.id.rv_aboutme_tweet)
    RecyclerView mRecyclerView;
    public AboutMeAdapter mAdapter;
    List<Active> mList;
    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return mCommonPager.mRootView;
    }

    @Override
    protected void loadSuccessPager() {
        //首先加载页面
        View viewAboutMe = View.inflate(UIUtils.getContext(), R.layout.fragment_aboutme,null);
        ButterKnife.bind(this,viewAboutMe);
        RecyclerView.LayoutManager layoutManager = new LinearLayoutManager(UIUtils.getContext());
        mRecyclerView.setLayoutManager(layoutManager);
        //添加适配器
        mAdapter = new AboutMeAdapter(mList);
        mRecyclerView.setAdapter(mAdapter);


    }

    @Override
    protected void loadData() {

    }
}
